$(document).ajaxSend(function (e, xhr, opt) {
    var user_token = localStorage.getItem("user_token");
    xhr.setRequestHeader("user_token", user_token);
    });

    function getUserInfo(url) {
        $.ajax({
            url:url,
            type:"get",
            success:function(result) {
                if(result.code==200 && result.data!=null) {
                    $(".left .card h3").text(result.data.userName);
                    $(".left .card a").attr("href",result.data.githubUrl);
                }else {
                    alert("获取用户信息错误");
                    location.href = "blog_login.html";
                }
            }
        });
    }